<template>
  <div class="home">
    <header>
      <div class="header-nav">头部导航===home</div>
      <button @click='exit'>退出登录</button>
    </header>
    <main>
      <nav>
        <ul>
          <li><router-link to="/">first</router-link></li>
          <li><router-link :to="second">second</router-link></li>
          <li><router-link :to="third">third</router-link></li>
          <li><router-link :to="forth">forth</router-link></li>
        </ul>
      </nav>
      <div class="right">放右侧导航内容<router-view></router-view></div>
    </main>
    <footer>底部导航</footer>
  </div>
</template>
<script>
export default {
  name: '',
  data () {
    return {
      second:{
        path:'/second',
        query:{
          id:2
        }
      },
      third:{
         name: 'Third',
         params:{
          ids:3
         }
       
      },
      forth:{
        name: 'Forth',
        params:{age:4},
        query:{
          num:4
        }
      }

    }
  },
  created () {
  },
  computed: {
  },
  methods: {
    exit(){
      //跳转登录页
      this.$router.push('/login')
    }
  }
}
</script>
<style lang='less'  scoped>

.home {
  width: 90vw;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  header {
    display: flex;
    justify-content: space-between;
    height: 40px;
     background-color: pink;
  }
  footer {
    height: 40px;
    text-align: center;
    background-color: pink;
  }
  main {
    flex: 1;
    display: flex;
    justify-content: space-between;
     background-color:skyblue;
     .router-link-exact-active{background-color: greenyellow;}
     a{text-decoration: none;}

  }
}
</style>
